package com.itheima.d4_proxy;

public class Demo1 {

}

class XiaoLan implements Star{
    private XiaoMing xiaoMing;
    @Override
    public double liveShow(double money) {
        System.out.println("小兰联系了一个表演节目赚了"+money);
        System.out.println("小明赚了"+money*0.5);
        return 0;
    }

    @Override
    public void sleep() {
        System.out.println("小兰定了一个酒店");
        xiaoMing.sleep();
        System.out.println("小兰退房");

    }
}

class XiaoMing implements Star{
    @Override
    public double liveShow(double money) {
        System.out.println("小明参加表演，赚了"+money);
        return money;
    }

    @Override
    public void sleep() {
        System.out.println("小明参加完节目休息");
    }
}


interface Star{
    double liveShow(double money);

    void sleep();
}